
import { StackNavigator, TabNavigator } from 'react-navigation';

//所有页面在此导入 ggggg
import Home from './pages/Home/Home';
import Message from './pages/Message/Message';
import PhoneBook from './pages/PhoneBook/PhoneBook';
import Profile from './pages/Profile/Profile';
import Inventory from './pages/Home/Inventory';
import {LoadingStart} from "./pages/Home/LoadingStart";


const TabContainer = new TabNavigator(
    {
        Home: { screen: Home },
        Message: { screen: Message },
        PhoneBook: { screen: PhoneBook },
        Profile: { screen: Profile }
    },
    {
        lazy: true,
        tabBarPosition: 'bottom',
        tabBarOptions: {
            activeTintColor: '#64bcc1',
            inactiveTintColor: '#999999',
            showIcon: true,
            style: {
                backgroundColor: '#ffffff',
                borderColor: '#ddd',
                borderTopWidth: 1
            },
            indicatorStyle: {
                opacity: 0
            },
            tabStyle: {
                padding: 0
            }
        }
    }
);

const App = new StackNavigator(
    //所有页面在此注册
    {
        Main: {
            screen: TabContainer,
            navigationOptions: {
                headerLeft: null
            }
        },

        Inventory: {
            screen: Inventory,
            navigationOptions: {

            }
        },
        LoadingStart:{
            screen: LoadingStart,
            navigationOptions:{

            }
        },
    },
    {
        headerMode: 'screen',
        navigationOptions: {
            headerStyle: {
                height:30,
                backgroundColor: '#f49826',
                elevation: 0,
                shadowOpacity: 0
            },
            headerTitleStyle: {
                color: '#fff',
                fontSize: 16,
                alignSelf:'center'
            },
            headerTintColor: '#fff'
        }
    }
);

export default App;